<template>
  <div class="dy-main TranscationDetail">
    <div class="dy-header">
      <x-header :right-options="{showMore: false}" :left-options="{preventGoBack:true}" @on-click-back="back">交易明细</x-header>
    </div>
    <div class="dy-body">
      <div class="bodyInfo">
        <group gutter="0">
          <cell :title="('银行账户')" @click.native="showPopupPicker1 = true" :value="value1[0]" is-link></cell>
          <cell :title="('交易类型')" @click.native="showPopupPicker2 = true" :value="value2[0]" is-link></cell>
          <cell :title="('快速查询')" @click.native="showPopupPicker3 = true" :value="value3[0]" is-link></cell>
          <datetime
            v-model="value4"
            @on-change="change"
            :title="('起始日期')"
            @on-cancel="log('cancel')"
            @on-confirm="onConfirm"
            @on-hide="log('hide', $event)"></datetime>
            <datetime
            v-model="value5"
            @on-change="change"
            :title="('终止日期')"
            @on-cancel="log('cancel')"
            @on-confirm="onConfirm"
            @on-hide="log('hide', $event)"></datetime>
          <!-- <cell :title="('起始日期')" @click.native="showPopupPicker4 = true" :value="value4[0]" is-link></cell>
          <cell :title="('终止日期')" @click.native="showPopupPicker5 = true" :value="value5[0]" is-link></cell> -->
        </group>
        <group>
          <popup-picker :show.sync="showPopupPicker1" :show-cell="false" :data="list1" v-model="value1"></popup-picker>
          <popup-picker :show.sync="showPopupPicker2" :show-cell="false" :data="list2" v-model="value2"></popup-picker>
          <popup-picker :show.sync="showPopupPicker3" :show-cell="false" :data="list3" v-model="value3"></popup-picker>
<!--           <popup-picker :show.sync="showPopupPicker4" :show-cell="false" :data="list4" v-model="value4"></popup-picker>
          <popup-picker :show.sync="showPopupPicker5" :show-cell="false" :data="list5" v-model="value5"></popup-picker> -->
        </group>
      </div>
      <div @click="back" class="searchButton">查询</div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      value1: ['请选择'],
      list1: [['请选择', '6223 **** **** 1111', '6223 **** **** 2222', '6223 **** **** 3333']],
      value2: ['请选择'],
      list2: [['请选择', '结汇', '购汇', '全部']],
      value3: ['请选择'],
      list3: [['请选择', '近一周', '近一月', '三个月']],
      value4: '',
      value5: '',
      showPopupPicker1: false,
      showPopupPicker2: false,
      showPopupPicker3: false
    }
  },
  methods: {
    back () {
      this.$publicFun.goBack(this)
    },
    query (name) {
      this.$router.push({path: name})
    },
    refreshTest () {
      let LVm = this
      this.$bridge.callhandler('nativeRequest',
        JSON.stringify({'requstSource': 'internetRequest', 'url': 'http://whichat.icitic.net/mstep/mstep.do?act=business', 'params': {'method_Name': 'M0401010', 'basic_Data': {'PayAccount': '6217298009765555', 'BuyAmt': '2001'}}}),
        function (response) {
          response = JSON.parse(response)
          if (response.status === 0 || response.status === '0') {
            LVm.prdList = response.data.data
          } else {
            LVm.aaa = response.data.data
          }
        }
      )
      // this.$router.push({name: 'FinancialBuySure', query: {'PayAccount': '6217298009765555', 'BuyAmt': '2001'}})
    }
  },
  created () {
    this.refreshTest()
  }
}
</script>

<style lang="less">
  .TranscationDetail{
    .dy-body{
      .searchButton{
        height: 0.88rem;
        width: 6.9rem;
        margin: 0.64rem auto;
        line-height: 0.88rem;
        text-align: center;
        color: #fff;
        border-radius: 0.06rem;
        background: #EC1B30;
        font-size: 0.34rem;
      }
    }
  }
</style>
